/**
 * 
 */
package org.t2.backstage.module.player.service;

import java.util.List;

import org.banish.sql.core.util.QuerySet;
import org.gaming.backstage.PageData;
import org.gaming.service.service.AbstractService;
import org.springframework.stereotype.Service;
import org.t2.backstage.module.player.model.PlayerSwitch;

/**
 * 
 */
@Service
public class PlayerSwitchService extends AbstractService<PlayerSwitch> {

	@Override
	public void mergeServer(int mergeDbZoneId) {
		//不用实现
	}
	
	public PlayerSwitch getEntity(long id) {
		return this.repository().getByKeys(id);
	}
	
	public PageData<PlayerSwitch> query(QuerySet querySet) {
		querySet.formWhere();
		List<PlayerSwitch> result = this.repository().getBaseDao().queryListWhere(querySet.getWhere(), querySet.getParams());
		long count = repository().getBaseDao().countWhere(querySet.getCountWhere(), querySet.getCountParams());
		PageData<PlayerSwitch> queryPage = new PageData<>(count, result);
		return queryPage;
	}
	
	public void delete(PlayerSwitch entity) {
		this.repository().delete(entity);
	}
}
